<!--{template header}-->

<!--{if $op == 'syn' || $op == 'find' || $op == 'group' || $op == 'request'}-->

<!--{if $_SGLOBAL['guidemode']}-->
<!--{template space_guide}-->
<!--{else}-->
<h2 class="title"><img src="image/icon/friend.gif">好友</h2>
<div class="tabs_header">
	<ul class="tabs">
		<li><a href="space.php?uid=$space[uid]&do=friend"><span>好友列表</span></a></li>
		<li$actives[find]><a href="cp.php?ac=friend&op=find"><span>可能认识的人</span></a></li>
		<!--{if empty($_SCONFIG['closeinvite'])}-->
		<li><a href="cp.php?ac=invite"><span>邀请好友</span></a></li>
		<!--{/if}-->
		<!--{if $op=='request'}-->
		<li$actives[request]><a href="cp.php?ac=friend&op=request"><span>好友请求</span></a></li>
		<!--{elseif $op=='group'}-->
		<li$actives[group]><a href="cp.php?ac=friend&op=request"><span>好友分组</span></a></li>
		<!--{/if}-->
	</ul>
</div>
<!--{/if}-->

<!--{/if}-->

<!--{if $op =='ignore'}-->

<div id="$uid" <!--{if !$_SGLOBAL[inajax]}-->class="inpage"<!--{/if}-->>
<form method="post" id="friendform_{$uid}" name="friendform_{$uid}" action="cp.php?ac=friend&op=ignore&uid=$uid&confirm=1">
	<h1>确定忽略好友关系吗？</h1>
	<p class="btn_line">
		<input type="hidden" name="refer" value="$_SGLOBAL[refer]">
		<!--{if $_SGLOBAL[inajax]}-->
		<input type="hidden" name="friendsubmit" value="true" />
		<button name="friendsubmit_btn" type="button" class="submit" value="true" onclick="ajaxpost('friendform_{$uid}', '$uid', 'friend_delete')">确定</button>
		<button name="btncancel" type="button" class="button" onclick="hideMenu()">取消</button>
		<!--{else}-->
		<button name="friendsubmit" type="submit" class="submit" value="true">确定</button>
		<!--{/if}-->
	</p>
	
<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
</form>
</div>

<!--{elseif $op == 'find'}-->


<!--{if $nearlist}-->
<div class="c_form">
	<h2 class="l_status title">惊喜，他们就在您的附近</h2>
	<ul class="avatar_list">
		<!--{loop $nearlist $key $value}-->
		<li>
			<div class="avatar48"><a href="space.php?uid=$value[uid]" title="{$_SN[$value[uid]]}" target="_blank"><img src="<!--{avatar($value[uid],small)}-->" alt="{$_SN[$value[uid]]}" /></a></div>
			<p><a href="space.php?uid=$value[uid]" title="{$_SN[$value[uid]]}">{$_SN[$value[uid]]}</a></p>
			<p class="gray"><a href="cp.php?ac=friend&op=add&uid=$value[uid]" id="a_near_friend_$key" onclick="ajaxmenu(event, this.id, 99999, '', -1)" class="addfriend">加为好友</a></p>
		</li>
		<!--{/loop}-->
	</ul>
</div>
<!--{/if}-->

<!--{if $friendlist}-->
<div class="c_form">
	<h2 class="l_status title">他们是您的好友的好友，您也可能认识</h2>
	<ul class="avatar_list">
		<!--{loop $friendlist $key $value}-->
		<li>
			<div class="avatar48"><a href="space.php?uid=$value[uid]" title="{$_SN[$value[uid]]}" target="_blank"><img src="<!--{avatar($value[uid],small)}-->" alt="{$_SN[$value[uid]]}" /></a></div>
			<p><a href="space.php?uid=$value[uid]" title="{$_SN[$value[uid]]}">{$_SN[$value[uid]]}</a></p>
			<p class="gray"><a href="cp.php?ac=friend&op=add&uid=$value[uid]" id="a_friend_friend_$key" onclick="ajaxmenu(event, this.id, 99999, '', -1)" class="addfriend">加为好友</a></p>
		</li>
		<!--{/loop}-->
	</ul>
</div>
<!--{/if}-->

<!--{if $onlinelist}-->
<div class="c_form">
	<h2 class="l_status title">他们当前正在线，加为好友就可以互动啦</h2>
	<ul class="avatar_list">
		<!--{loop $onlinelist $key $value}-->
		<li>
			<div class="avatar48"><a href="space.php?uid=$value[uid]" title="{$_SN[$value[uid]]}" target="_blank"><img src="<!--{avatar($value[uid],small)}-->" alt="{$_SN[$value[uid]]}" /></a></div>
			<p><a href="space.php?uid=$value[uid]" title="{$_SN[$value[uid]]}">{$_SN[$value[uid]]}</a></p>
			<p class="gray"><a href="cp.php?ac=friend&op=add&uid=$value[uid]" id="a_online_friend_$key" onclick="ajaxmenu(event, this.id, 99999, '', -1)" class="addfriend">加为好友</a></p>
		</li>
		<!--{/loop}-->
	</ul>
</div>
<!--{/if}-->

<!--{if $hotlist}-->
<div class="c_form">
	<h2 class="l_status title">人气最高的会员，您也可能认识</h2>
	<ul class="avatar_list">
		<!--{loop $hotlist $key $value}-->
		<li>
			<div class="avatar48"><a href="space.php?uid=$value[uid]" title="{$_SN[$value[uid]]}" target="_blank"><img src="<!--{avatar($value[uid],small)}-->" alt="{$_SN[$value[uid]]}" /></a></div>
			<p><a href="space.php?uid=$value[uid]" title="{$_SN[$value[uid]]}">{$_SN[$value[uid]]}</a></p>
			<p class="gray"><a href="cp.php?ac=friend&op=add&uid=$value[uid]" id="a_hot_friend_$key" onclick="ajaxmenu(event, this.id, 99999, '', -1)" class="addfriend">加为好友</a></p>
		</li>
		<!--{/loop}-->
	</ul>
</div>
<!--{/if}-->


<!--{if $residelist}-->
<div class="c_form">
	<h2 class="l_status title">一个地方的人，都居住在 $space[resideprovince] $space[residecity]</h2>
	<ul class="avatar_list">
		<!--{loop $residelist $key $value}-->
		<li>
			<div class="avatar48"><a href="space.php?uid=$value[uid]" title="{$_SN[$value[uid]]}" target="_blank"><img src="<!--{avatar($value[uid],small)}-->" alt="{$_SN[$value[uid]]}" /></a></div>
			<p><a href="space.php?uid=$value[uid]" title="{$_SN[$value[uid]]}">{$_SN[$value[uid]]}</a></p>
			<p class="gray"><a href="cp.php?ac=friend&op=add&uid=$value[uid]" id="a_reside_friend_$key" onclick="ajaxmenu(event, this.id, 99999, '', -1)" class="addfriend">加为好友</a></p>
		</li>
		<!--{/loop}-->
	</ul>
</div>
<!--{/if}-->


<!--{if $sexlist}-->
<div class="c_form">
	<h2 class="l_status title">想结识异性朋友吗？推荐给您 <!--{if empty($space['marry']) || $space['marry'] < 2}-->单身<!--{/if}-->
	<!--{if empty($space['sex']) || $space['sex'] < 2}-->美女<!--{else}-->帅哥<!--{/if}--></h2>
	<ul class="avatar_list">
		<!--{loop $sexlist $key $value}-->
		<li>
			<div class="avatar48"><a href="space.php?uid=$value[uid]" title="{$_SN[$value[uid]]}" target="_blank"><img src="<!--{avatar($value[uid],small)}-->" alt="{$_SN[$value[uid]]}" /></a></div>
			<p><a href="space.php?uid=$value[uid]" title="{$_SN[$value[uid]]}">{$_SN[$value[uid]]}</a></p>
			<p class="gray"><a href="cp.php?ac=friend&op=add&uid=$value[uid]" id="a_sex_friend_$key" onclick="ajaxmenu(event, this.id, 99999, '', -1)" class="addfriend">加为好友</a></p>
		</li>
		<!--{/loop}-->
	</ul>
</div>
<!--{/if}-->

<form method="get" action="network.php" class="c_form"<!--{if $_SGLOBAL['guidemode']}--> target="_blank"<!--{/if}-->>
	<!--{if !$_SGLOBAL['guidemode']}-->
	<table cellspacing="0" cellpadding="0" class="formtable">
		<caption>
			<h2>高级搜索</h2>
			<p>您可以自己设置搜索条件，寻找与自己志同道合的好友</p>
		</caption>
		<tr>
			<th>用户名</th>
			<td>
				<input type="text" class="t_input" name="username" value="" />
				&nbsp; 姓名 <input type="text" class="t_input" name="name" value="" />
			</td>
		</tr>
		<tr>
			<th>性别</th>
			<td>
				<select id="sex" name="sex">
					<option value="0">任意</option>
					<option value="1"$sexarr[1]>男</option>
					<option value="2"$sexarr[2]>女</option>
				</select>
				&nbsp; 生日 
				<select id="birthyear" name="birthyear">
					<option value="0">年</option>
					$birthyeayhtml
				</select> 
				<select id="birthmonth" name="birthmonth">
					<option value="0">月</option>
					$birthmonthhtml
				</select> 
				<select id="birthday" name="birthday">
					<option value="0">日</option>
					$birthdayhtml
				</select> 
			</td>
		</tr>
		
		<tr>
			<th>血型</th>
			<td>
				<select id="blood" name="blood">
					<option value="">任意</option>
					$bloodhtml
				</select>
				&nbsp; 婚恋 
				<select id="marry" name="marry">
					<option value="0">任意</option>
					<option value="1"$marryarr[1]>单身</option>
					<option value="2"$marryarr[2]>非单身</option>
				</select>
			</td>
		</tr>
		
		<tr>
			<th>出生地</th>
			<td>
				<script type="text/javascript" src="source/script_city.js"></script>
				<script type="text/javascript">
				<!--
				showprovince('birthprovince', 'birthcity', '');
				showcity('birthcity', '');
				//-->
				</script>
				&nbsp; 居住地 
				<script type="text/javascript">
				<!--
				showprovince('resideprovince', 'residecity', '');
				showcity('residecity', '');
				//-->
				</script>
			</td>
		</tr>
		<tr>
			<th>QQ</th>
			<td>
				<input type="text" name="qq" value="" class="t_input" />
				&nbsp; MSN 
				<input type="text" name="msn" value="" class="t_input" />
			</td>
		</tr>
		<tr>
			<th>年龄段</th>
			<td>
				<input type="text" name="startage" value="" size="10" class="t_input" /> ~ <input type="text" name="endage" value="" size="10" class="t_input" />
			</td>
		</tr>
		<tr>
			<th>加入的群组</th>
			<td>
			<select name="fieldid">
				<option value="0">请选择群组分类</option>
				<!--{loop $_SGLOBAL[profield] $fieldid $value}-->
				<option value="$fieldid"$fieldids[$fieldid]>$value[title]</option>
				<!--{/loop}-->
			</select>
			群组名 <input type="text" class="t_input" name="fieldname" value="" />
			</td>
		</tr>
		
		<!--{loop $fields $fkey $fvalue}-->
		<!--{if $fvalue[allowsearch]}-->
		<tr>
			<th>$fvalue[title]</th>
			<td>
				$fvalue[html]
			</td>
		</tr>
		<!--{/if}-->
		<!--{/loop}-->
		</table>
		<!--{/if}-->

		<table cellspacing="0" cellpadding="0" class="formtable">
		<!--{if $_SGLOBAL['guidemode']}-->
		<caption>
			<h2>进入我的首页</h2>
			<p>您需要点击下面的按钮，结束安家过程</p>
		</caption>
		<tr>
			<th width="23%">&nbsp;</th>
			<td>
				<input type="button" name="closeguide" value="进入我的首页" class="submit" onclick="window.location='space.php?do=home&view=guide&step=4';" />
				<br>结束向导后，您还可以在导航菜单中重新找到向导入口
			</td>
		</tr>
		<!--{else}-->
		<tr>
			<th>&nbsp;</th>
			<td>
			<input type="hidden" name="ac" value="space" />
			<input type="hidden" name="searchmode" value="1" />
			<input type="submit" name="findsubmit" value="寻找好友" class="submit" />
			</td>
		</tr>
		<!--{/if}-->
	</table>
</form>

<!--{elseif $op=='changegroup'}-->

<div id="$uid" <!--{if !$_SGLOBAL[inajax]}-->class="inpage"<!--{/if}-->>
<form method="post" id="changegroupform_{$uid}" name="changegroupform_{$uid}" action="cp.php?ac=friend&op=changegroup&uid=$uid">
	<div class="h_status">设置好友分组</div>
	
	<table cellspacing="2" cellpadding="2"><tr>
	<!--{eval $i=0;}-->
	<!--{loop $groups $key $value}-->
	<td><input type="radio" name="group" value="$key"$groupselect[$key]> $value</td>
	<!--{if $i%2==1}--></tr><tr><!--{/if}-->
	<!--{eval $i++;}-->
	<!--{/loop}-->
	</tr></table>

	<p class="btn_line">
		<input type="hidden" name="refer" value="$_SGLOBAL[refer]">
		<!--{if $_SGLOBAL[inajax]}-->
		<input type="hidden" name="changegroupsubmit" value="true" />
		<button name="changegroupsubmit_btn" type="button" class="submit" value="true" onclick="ajaxpost('changegroupform_{$uid}', '$uid', 'friend_changegroup')">确定</button>&nbsp;
		<button name="btncancel" type="button" class="button" onclick="hideMenu()">取消</button>
		<!--{else}-->
		<button name="changegroupsubmit" type="submit" class="submit" value="true">确定</button>
		<!--{/if}-->
	</p>
	
<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
</form>
</div>

<!--{elseif $op=='group'}-->

<div id="content" style="width: 640px;">
	<form method="post" action="cp.php?ac=friend&op=group&ref">
<!--{if $list}-->
	<div class="thumb_list" id="friend_ul">
		<ul>
		<!--{loop $list $key $value}-->
			<li>
				<div class="avatar48"><a href="space.php?uid=$value[uid]"><img src="<!--{avatar($value[uid],small)}-->" alt="{$_SN[$value[uid]]}" width="48" height="48" /></a></div>
				<div class="thumbTitle"><input type="checkbox" name="fuids[]" value="$value[uid]" /><a href="space.php?uid=$value[uid]">{$_SN[$value[uid]]}</a></div>
				<div class="setti">$value[group]</div>
			</li>
		<!--{/loop}-->
		</ul>
	</div>
	<div class="page">$multi</div>
	<div>
		<input type="checkbox" id="chkall" name="chkall" onclick="checkAll(this.form, 'fuids')" /><label for="chkall">全选</label></td>
		设置用户组：<select name="group">
			<!--{loop $groups $key $value}-->
				<option value="$key">$value</option>
			<!--{/loop}-->
			</select>
			<input type="submit" name="btnsubmit" value="确定" class="submit" />
	</div>
<!--{else}-->
	<div class="c_form">
		没有相关用户列表。
	</div>
<!--{/if}-->
	<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
	<input type="hidden" name="groupsubmin" value="true" />
	</form>
</div>

<div id="sidebar" style="width: 150px; overflow:visible;">
	<div class="cat">
	<h3>好友分组</h3>
	<ul class="post_list">
		<li<!--{if !isset($_GET[group])}--> class="current"<!--{/if}-->><a href="cp.php?ac=friend&op=group">全部好友</a></li>
		<!--{loop $groups $key $value}-->
		<li<!--{if isset($_GET[group]) && $_GET[group]==$key}--> class="current"<!--{/if}-->><a href="cp.php?ac=friend&op=group&group=$key">$value</a></li>
		<!--{/loop}-->
	</ul>
	</div>
</div>

<!--{elseif $op=='groupname'}-->

<div id="$group" <!--{if !$_SGLOBAL[inajax]}-->class="inpage"<!--{/if}-->>
<form method="post" id="groupnameform_{$group}" name="groupnameform_{$group}" action="cp.php?ac=friend&op=groupname&group=$group">
	<h1>设置新好友分组名</h1>
	<div class="c_form">
		新名称：<input type="text" name="groupname" value="$groups[$group]" size="15" class="t_input">
		<input type="hidden" name="refer" value="$_SGLOBAL[refer]">
		<!--{if $_SGLOBAL[inajax]}-->
		<input type="hidden" name="groupnamesubmit" value="true" />
		<input type="button" name="groupnamesubmit_btn" value="确定" class="submit" onclick="ajaxpost('groupnameform_{$group}', '$group', 'friend_changegroupname')" />
		<input type="button" name="btnclose" value="取消" onclick="hideMenu();" class="button" />
		<!--{else}-->
		<input type="submit" name="groupnamesubmit" value="确定" class="submit" />
		<!--{/if}-->
	</div>
	
<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
</form>
</div>


<!--{elseif $op=='groupignore'}-->

<div id="$group" <!--{if !$_SGLOBAL[inajax]}-->class="inpage"<!--{/if}-->>
<form method="post" id="groupignoreform" name="groupignoreform" action="cp.php?ac=friend&op=groupignore&group=$group">
	<!--{if !isset($space['privacy']['filter_gid'][$group])}-->
	<h1>屏蔽该用户组动态</h1>
	<p>在首页不显示该用户组的好友动态</p>
	<!--{else}-->
	<h1>首页该用户组动态</h1>
	<p>在首页显示该用户组的好友动态</p>
	<!--{/if}-->
	<p class="btn_line">
		<input type="hidden" name="refer" value="$_SGLOBAL[refer]">
		<!--{if $_SGLOBAL[inajax]}-->
		<input type="hidden" name="groupignoresubmit" value="true" />
		<button name="groupignoresubmit_btn" type="submit" class="submit" value="true">确定</button>
		<button name="btncancel" type="button" class="button" onclick="hideMenu()">取消</button>
		<!--{else}-->
		<button name="groupignoresubmit" type="submit" class="submit" value="true">确定</button>
		<!--{/if}-->
	</p>
	
<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
</form>
</div>

<!--{elseif $op=='request'}-->

<div class="l_status">
	<div class="r_option">
		<a href="cp.php?ac=friend&op=ignore&confirm=1&key=$space[key]" onclick="return confirm('您确定要忽略所有的好友申请吗？');">忽略所有好友申请(慎用)</a>
		<!--{if checkperm('admin')}--> | <a href="cp.php?ac=friend&op=addconfirm&key=$space[key]">批准全部申请</a><!--{/if}-->
	</div>
	<span id="add_friend_div">请选定好友的申请进行批准或忽略</span>
</div>
<!--{if $list}-->
<div class="thumb_list" id="friend_ul">
<table cellspacing="6" cellpadding="0">
<!--{loop $list $key $value}-->
<tr>
	<td class="thumb <!--{if $ols[$value[uid]]}-->online<!--{/if}-->">
		<table cellpadding="0" cellspacing="0">
			<tr>
				<td class="image">
				<div class="ar_r_t"><div class="ar_l_t"><div class="ar_r_b"><div class="ar_l_b">
				<a href="space.php?uid=$value[uid]" class="avatarlink"><img src="<!--{avatar($value[uid],middle)}-->" alt="{$_SN[$value[uid]]}" /></a>
				</div></div></div></div>
				</td>
				<td>
					<h6 class="l_status"><a href="space.php?uid=$value[uid]">{$_SN[$value[uid]]}</a></h6>
					<div id="friend_$value[uid]">
					<!--{if $value[note]}--><div class="quote"><span id="quote" class="q">$value[note]</span></div><!--{/if}-->
					<p><!--{date('m-d H:i',$value[dateline],1)}--></p>
					<!--{if $value['cfcount']}--><p><a href="cp.php?ac=friend&op=getcfriend&fuid=$value[cfriend]" id="a_cfriend_$key" onclick="ajaxmenu(event, this.id, 99999, '', -1)">你们有 $value[cfcount] 个共同好友</a></p><!--{/if}-->
					<p style="margin-top:1em;">
						<a href="cp.php?ac=friend&op=add&uid=$value[uid]" id="a_f_r_$value[uid]" onclick="ajaxmenu(event, this.id, 99999, '', -1)" class="submit a">批准申请</a>
						<a href="cp.php?ac=friend&op=ignore&uid=$value[uid]&confirm=1" id="a_f_i_$value[uid]" onclick="ajaxmenu(event, this.id, 1, 'myfriend')" class="button a">忽略</a>
					</p>
					</div>
				</td>
			</tr>
			<tbody id="cf_$value[uid]"></tbody>
		</table>
	</td>
</tr>
<!--{/loop}-->
</table>
</div>
<div class="page">$multi</div>
<!--{else}-->
<div class="c_form">
	没有新的好友请求。
</div>
<!--{/if}-->

<script>
	function myfriend(id) {
		var tbid = id.substr(6);
		$('friend_'+tbid).innerHTML = '忽略了当前用户的好友申请';
	}
</script>

<!--{elseif $op=='getcfriend'}-->

<div id="cfriend" <!--{if !$_SGLOBAL[inajax]}-->class="inpage"<!--{/if}--> style="width:400px;">
<!--{if $_SGLOBAL[inajax]}-->
	<h1>共同好友</h1>
	<a href="javascript:hideMenu();" class="float_del" title="关闭">关闭</a>
	<div class="popupmenu_inner">
<!--{/if}-->
<div class="h_status">最多显示15位共同的好友</div>
<ul class="avatar_list">
	<!--{loop $list $key $value}-->
	<li>
		<div class="avatar48"><a href="space.php?uid=$value[uid]"><img src="<!--{avatar($value[uid],small)}-->" alt="{$_SN[$value[uid]]}" /></a></div>
		<p><a href="space.php?uid=$value[uid]" title="{$_SN[$value[uid]]}">{$_SN[$value[uid]]}</a></p>
	</li>
	<!--{/loop}-->
</ul>
<!--{if $_SGLOBAL[inajax]}--></div><!--{/if}-->
</div>

<!--{elseif $op=='add'}-->

<div id="$tospace[uid]" <!--{if !$_SGLOBAL[inajax]}-->class="inpage"<!--{/if}-->>
<!--{if $_SGLOBAL[inajax]}-->
<h1>加好友</h1>
<a href="javascript:hideMenu();" title="关闭" class="float_del">关闭</a>
<div class="popupmenu_inner">
<!--{/if}-->
<form method="post" id="addform_{$tospace[uid]}" name="addform_{$tospace[uid]}" action="cp.php?ac=friend&op=add&uid=$tospace[uid]">
	<table cellspacing="0" cellpadding="3">
		<tr>
			<th width="52"><a href="space.php?uid=$tospace[uid]"><img src="<!--{avatar($tospace[uid],small)}-->" alt="{$_SN[$tospace[uid]]}" width="48" height="48" /></th>
			<td>加 <strong>{$_SN[$tospace[uid]]}</strong> 为好友，附言：<br />
				<input type="text" name="note" value="" size="20" class="t_input" style="width: 300px;"  onkeydown="ctrlEnter(event, 'addsubmit_btn', 1);" />
				<p class="gray">(附言为可选，{$_SN[$tospace[uid]]} 会看到这条附言，最多50个字符)</p>
			</td>
		</tr>
		<tr>
			<th>&nbsp;</th>
			<td>
				分组: <select name="gid">
				<!--{loop $groups $key $value}-->
				<option value="$key">$value</option>
				<!--{/loop}-->
				</select>
				<input type="hidden" name="refer" value="$_SGLOBAL[refer]" />
				<input type="hidden" name="addsubmit" value="true" />
				<!--{if $_SGLOBAL[inajax]}-->
				<input type="button" name="addsubmit_btn" id="addsubmit_btn" value="确定" class="submit" onclick="ajaxpost('addform_{$tospace[uid]}', '$tospace[uid]')" />
				<!--{else}-->
				<input type="submit" name="addsubmit_btn" id="addsubmit_btn" value="确定" class="submit" />
				<!--{/if}-->
			</td>
	</table>
	
<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
</form>
<!--{if $_SGLOBAL[inajax]}--></div><!--{/if}-->
</div>


<!--{elseif $op=='add2'}-->

<div id="$tospace[uid]" <!--{if !$_SGLOBAL[inajax]}-->class="inpage"<!--{/if}-->>
<!--{if $_SGLOBAL[inajax]}-->
<h1>批准请求</h1>
<a href="javascript:hideMenu();" title="关闭" class="float_del">关闭</a>
<div class="popupmenu_inner" style="width: 400px;">
<!--{/if}-->
<form method="post" id="addratifyform_{$tospace[uid]}" name="addratifyform_{$tospace[uid]}" action="cp.php?ac=friend&op=add&uid=$tospace[uid]">
	<table cellspacing="0" cellpadding="3">
		<tr>
			<th width="52"><a href="space.php?uid=$tospace[uid]"><img src="<!--{avatar($tospace[uid],small)}-->" alt="{$_SN[$tospace[uid]]}" width="48" height="48" /></th>
			<td>
			<div class="l_status">批准 <strong>{$_SN[$tospace[uid]]}</strong> 的好友请求，并分组：</div>
				<table cellspacing="2" cellpadding="2"><tr>
				<!--{eval $i=0;}-->
				<!--{loop $groups $key $value}-->
				<td><input type="radio" name="gid" id="group_$key" value="$key"$groupselect[$key]> <label for="group_$key">$value</label></td>
				<!--{if $i%2==1}--></tr><tr><!--{/if}-->
				<!--{eval $i++;}-->
				<!--{/loop}-->
				</tr></table>
				
				<p>
				<input type="hidden" name="refer" value="$_SGLOBAL[refer]" />
				<!--{if $_SGLOBAL[inajax]}-->
				<input type="hidden" name="add2submit" value="true" />
				<input type="button" name="add2submit_btn" value="批准" class="submit" onclick="ajaxpost('addratifyform_{$tospace[uid]}', '$tospace[uid]', 'myfriend_post')" />
				<!--{else}-->
				<input type="submit" name="add2submit" value="批准" class="submit" />
				<!--{/if}-->
				</p>
			</td>
	</table>
	
<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
</form>
<!--{if $_SGLOBAL[inajax]}--></div><!--{/if}-->
</div>

<!--{/if}-->
<!--{template footer}-->
